package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户钱包退款记录
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_user_wallet_refund_log")
public class UserWalletRefundLog extends Model<UserWalletRefundLog> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "refund_id", type = IdType.ASSIGN_ID)
    private String refundId;
    /**
     * 退款金额
     */
    @TableField("refund_amount")
    private BigDecimal refundAmount;
    /**
     * 退赠送金额
     */
    @TableField("refund_give_amount")
    private BigDecimal refundGiveAmount;
    /**
     * 退款编号
     */
    @TableField("refund_no")
    private Integer refundNo;
    /**
     * 退款状态:0退款中1退款成功2退款失败
     */
    @TableField("refund_status")
    private Integer refundStatus;
    /**
     * 退款时间
     */
    @TableField("refund_time")
    private LocalDateTime refundTime;
    /**
     * 订单ID
     */
    @TableField("order_id")
    private String orderId;
    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;
    /**
     * 套餐编码
     */
    @TableField("plan_code")
    private String planCode;
    /**
     * 操作人
     */
    @TableField("operator")
    private String operator;
    /**
     * 操作组织
     */
    @TableField("operate_org_id")
    private String operateOrgId;

    public void freeData() {
        this.refundId = null;
        this.refundAmount = null;
        this.refundGiveAmount = null;
        this.refundNo = null;
        this.refundStatus = null;
        this.refundTime = null;
        this.orderId = null;
        this.userId = null;
        this.planCode = null;
        this.operator = null;
        this.operateOrgId = null;
    }

}
